﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="report-newsalert-filter.aspx.cs"
    Inherits="MediaMonitor.Users.report_newsalert_filter" Theme="default" MasterPageFile="~/user.master"
    Title="Report Filters - News" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Src="~/Controls/AutoCompleteExtender.ascx" TagPrefix="ctrl" TagName="AutoComplete" %>
<asp:Content ContentPlaceHolderID="Head" runat="server">
    <link href="../rad-scripts/Calendar.MyCustomSkin.css" rel="stylesheet" type="text/css" />
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">

            function DateSelected(sender, eventArgs) {


                var date = eventArgs.get_renderDay().get_date();
                var dfi = sender.DateTimeFormatInfo;
                var formattedDate = dfi.FormatDate(date, dfi.ShortDatePattern);

                var calE = $find("<%= calE.ClientID %>");

                calE.selectDate(date, true)

            } 

        </script>
    </telerik:RadCodeBlock>
</asp:Content>
<asp:Content ContentPlaceHolderID="Body" runat="server">
    <asp:Panel ID="pnlSearch" runat="server">
        <table>
            <tr>
                <td colspan="2">
                    <b>Dates</b><br />
                    <br />
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    <table>
                        <tr valign="top">
                            <td>
                                From Date
                                <br />
                                <telerik:RadCalendar AutoPostBack="false" ID="calS" runat="server" EnableMultiSelect="false"
                                    ClientEvents-OnDateSelected="DateSelected">
                                </telerik:RadCalendar>
                            </td>
                            <td>
                                <div style="width: 50px;">
                                </div>
                            </td>
                            <td>
                                To Date
                                <br />
                                <telerik:RadCalendar AutoPostBack="false" ID="calE" runat="server" EnableMultiSelect="false">
                                </telerik:RadCalendar>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3">
                                <small><u class="ErrorText">Note:</u> only dates in blue color are valid dates having
                                    commercial's data.</small>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td>
                    Name of the News
                </td>
                <td>
                    <asp:TextBox ID="txtNewsTitle" runat="server" Width="404px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
                <td>
                    Title:
                    <asp:CheckBox ID="chkTitle" runat="server" Checked="true" />
                    &nbsp;&nbsp;Summary:
                    <asp:CheckBox ID="chkSummary" runat="server" Checked="true" />
                    &nbsp;&nbsp;Text:<asp:CheckBox ID="chkText" runat="server" Checked="true" />
                </td>
            </tr>
            <tr>
                <td colspan="4">
                    <br />
                    <br />
                    <b>Options</b><br />
                    <br />
                </td>
                <td colspan="3">
                </td>
            </tr>
            <tr>
                <td>
                    Advertiser
                </td>
                <td>
                    <asp:DropDownList ID="lstAdvertiser" runat="server" DataTextField="AdvertiserName" />
                </td>
            </tr>
            <tr>
                <td>
                    Calificacion
                </td>
                <td>
                    <asp:DropDownList ID="lstNewsType" runat="server">
                        <asp:ListItem Text="-ALL-" Value="0"></asp:ListItem>
                        <asp:ListItem Text="POSITIVA" Value="1"></asp:ListItem>
                        <asp:ListItem Text="NEGATIVA" Value="2"></asp:ListItem>
                        <asp:ListItem Text="NEUTRA" Value="3"></asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                    News Media Types
                </td>
                <td>
                <%--<asp:DropDownList ID="lstNewsMediaType" runat="server" AutoPostBack="true"
                OnSelectedIndexChanged="lstNewsMediaType_SelectedIndexChanged">
                <asp:ListItem Text="-ALL-" Value="0"></asp:ListItem>
                <asp:ListItem Text="TV" Value="1"></asp:ListItem>
                <asp:ListItem Text="Radio" Value="3"></asp:ListItem>
                <asp:ListItem Text="Press" Value="6"></asp:ListItem>
                </asp:DropDownList>--%>
                    <asp:DropDownList ID="lstNewsMediaType" runat="server" AutoPostBack="true" DataValueField="MediaTypeCode"
                        DataTextField="MediaTypeName" OnSelectedIndexChanged="lstNewsMediaType_SelectedIndexChanged"  />
                        
                        
                </td>
            </tr>
            <tr valign="top">
                <td>
                    Channel / Media Name
                </td>
                <td style="font-size: small;">
                   
                   
                    <asp:UpdatePanel ID="pnlUpdate_Media" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
                        <ContentTemplate>
                         <asp:CheckBox ID="chkAllMedia" runat="server" Text="Search from all Media Channels"
                        Checked="true"  AutoPostBack="true" OnCheckedChanged="chkAllMedia_Changed"/>
                            <asp:Panel ID="panelMediaList"  class="Box" runat="server" Visible="false" >
                                <asp:CheckBoxList ID="lstMedia" runat="server" DataValueField="MediaCode" DataTextField="MediaName"
                                    RepeatColumns="5" RepeatDirection="Horizontal" Font-Size="8px" >
                                </asp:CheckBoxList>
                            </asp:Panel>
                            <br />
                            <br />
                           
                        </ContentTemplate>
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="lstNewsMediaType" EventName="SelectedIndexChanged" />
                        </Triggers>
                    </asp:UpdatePanel>
                   
                    <br />
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td colspan="3">
                    <asp:ImageButton ID="btnSearch" runat="server" OnClick="btnSearch_Click" SkinID="Search" />
                </td>
            </tr>
        </table>
    </asp:Panel>
</asp:Content>
